package movee.spring.app.template.domain.api;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 一般情况下记录响应数据数量的响应
 *
 * @author movee
 */
@Data
@NoArgsConstructor
public class CountedResponseData<T> extends ResponseData<T> {

    @JsonProperty(index = 1)
    private Long totalCount;

    public CountedResponseData(Long totalCount, T data) {
        super(data);
        this.totalCount = totalCount;
    }

}
